#include "instructionpanel.h"
#include "expara.h"

InstructionPanel::InstructionPanel(QObject *parent)
    : QObject(parent)
{
    db.connectDB();
}


QString InstructionPanel::getTitle(int i)
{
    //settitleList(key);
    return titleList.at(i);
    index = i;
}

void InstructionPanel::settitleList(QString key)
{//
    titleList.clear();
    db.connectDB();
   //QString sql = "select Title from Instructions where Type = \'"+ key +"\'";
    this->titleList = db.getDBData(key);
    db.closeDB();

}

int InstructionPanel::strCount() const
{
    return titleList.length();
}
